<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String appid= (String) request.getParameter("appid");
    String giftUuid=request.getParameter("giftUuid");
    String cid=request.getParameter("cid");
    request.setAttribute("giftUuid", giftUuid);
    request.setAttribute("cid", cid);
    request.setAttribute("appid", appid);
%>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache,must-revalidate">
    <meta http-equiv="expires" content="0">
    <%@include file="../common/base.jsp"%>
    <title>${appName}</title>

    <script type="text/javascript">
        /*字号rem尺寸变化代码*/
        (function () {
            window.onload = window.onresize = function () {
                var wit= 100 * (document.documentElement.clientWidth / 750);
                document.documentElement.style.fontSize = wit>100?100:wit + 'px'
            };
            window.appid="${appid}";
        })()
    </script>
    <link rel="stylesheet" href="${base}/activity/giftCollection/css/main.css?version=${version}">
    <style>
        .bodys{
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            max-width: 7.6rem;
            margin: 0 auto;
            background-image: url("${backgroundImage}");
            <%--background-image: url("${base}/activity/share/img/home_bk.png");--%>
            background-repeat: no-repeat;
            background-position: center center;
            background-size: 100% 100%;
        }
        @media screen and (min-width: 750px) {
            .e-text, .e-text-parme{
                width: 90%;
                height: .6rem;
                font-size: .28rem;
            }
            .e-text>[type="text"]{
                height: .6rem;
                line-height: .6rem;
            }
            .e-text-parme>[type="text"]{
                height: .6rem;
                line-height: .6rem;
            }
            .e-text-parme>b{
                top: 0;
            }
            .gift-content-ul>li>button{
                width: 90%;
                height: .6rem;
                margin: 0 auto;
            }
            .gift-content-a>a{
                font-size: .20rem;
            }
            body{
                position: absolute;
                max-height: 11rem;
                min-height: 10rem;
            }
        }
        .e-text,.e-text-parme{
            display: inline-block;
            width: 100%;
            /* height: .6rem; */
            border: 1px solid #eee;
            border-radius: .8rem;
            background-color: #fff;
            position: relative;
            font-size: .32rem;
            overflow: hidden;

        }
    </style>
</head>
<body>
<%--<body style="background-image: url(/activity/images/home-bk.png)">--%>
<div class="bodys">
    <div style="position: absolute;" class="gift-content">
        <ul class="gift-content-ul">
            <input type="hidden" id="giftUuid" name="giftUuid" value="${uuid}" >
            <input type="hidden" id="cid" name="cid" value="${cid}">
            <li><label class="e-text"><input type="text" name="mobile" id="mobile" placeholder="请输入手机号"></label></li>
            <li><label class="e-text-parme"><input type="text" name="identifyCode" id="identifyCode" placeholder="请输入验证码"><b id="getCode">验证码</b></label></li>
            <li><button id="sub-btn" style="background-image: url(${buttonImage})"></button></li>
            <%--<li><button id="sub-btn" style="background-image: url(${base}/activity/share/img/code.png)"></button></li>--%>
            <%--<li><button id="sub-btn" style="background-image: url(/activity/images/home_Buttons2.png)"></button></li>--%>
        </ul>
        <div class="gift-content-a">
            <a href="" class="downloadApp">下载${appName}APP</a>
            <a href="javascript:void(0);" id="showRule">规则说明</a>
        </div>
    </div>
</div>



    <div class="mark" style="display: none;"></div>
<%--通用--%>
    <div class="gift-tan" style="display: none;" id="tongtan">
        <div class="tan-content">
            <div class="colse colse_tan"></div>
            <div class="title">提示</div>
            <div class="textt" style="text-align: center;">你已经是老用户啦，去邀请别人获得更多优惠券吧！</div>
            <a class="btns downloadApp" href="${appurl}" id="oldlong" style="margin-bottom: 10px;">下载${appName}APP</a>
            <div class="btns colse_tan" id="colse_long" style="background-color: #fff; border: 1px solid #4f5a67;color: #4f5a67;">好的</div>
        </div>
    </div>
    <%--领取成功--%>
    <div class="gift-tan" id="getSuccess" style="display: none;">
        <div class="tan-content">
            <div class="colse colse_tan"></div>
            <div class="title">恭喜你获得<span class="couponMoney"></span>元优惠券</div>
            <div class="textt">恭喜你，我们已经发送价值<span class="couponMoney"></span>元优惠券到你的账户，请赶快去下载。</div>
            <a class="btns downloadApp" href="${appurl}">下载${appName}APP</a>
        </div>
    </div>
    <%--规则说明--%>
    <div class="gift-tan" id="guizetan" style="display: none;">
        <div class="tan-content guize">
            <div class="colse colse_tan"></div>
            <div class="title">规则说明</div>
            <div class="textt">
                ${ruleDescription}
            </div>
            <%--<div class="btns colse_tan">知道了</div>--%>
        </div>
    </div>

<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.3&key=55897440ff54932c599cc73b9b4baf1c&plugin=AMap.CitySearch"></script>
    <script type="text/javascript" src="${base}/activity/giftCollection/js/jquery.min.js"></script>
    <script type="text/javascript" src="${base}/plugin/layer-v3.0.3/layer.js"></script>
    <%--<script type="text/javascript" src="${base}/plugin/crypto-js/crypto-js.min.js"></script>--%>
    <%--<script type="text/javascript" src="${base}/plugin/jsencrypt/jsencrypt.min.js"></script>--%>
    <script type="text/javascript" src="${base}/activity/giftCollection/js/ajaxUtil.js?version=${version}"></script>
    <script type="text/javascript" src="${base}/activity/giftCollection/js/main.js?version=${version}"></script>
<script>
    (function () {
        var downloadapp = $(".downloadApp");
        var u = navigator.userAgent;
        var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1;             //安卓
        var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);                         //IOS
        if (isAndroid) {
            downloadapp.attr("href",  window.downloadApp.android)
        }else if (isIOS) {
            downloadapp.attr("href",  window.downloadApp.ios)
        }
    })()

</script>
</body>
</html>
